{% extends 'gamer_view/base.html' %}
{% load static %}

{% block title_block %}
	Categories
{% endblock %}

{% block body_block %}

	<!-- area of content to display the categories -->
	<div id="content_area">
	
		<!-- display every category and the latest 3 games from each -->
		{% for cat ,value in categories.items %}
			<div id="category_name" class="button">
				<a href={% url 'gamer_view:show_category' cat.category %} id="format_hyperlink">{{ cat.category }}<br>
				<P id="categories_box"></p>
			</div>
			{% for page in value %}
				<a href={% url 'gamer_view:show_page' cat.category page.slug %}><img src="{{ page.image.url }}" id="format_image" border="2" alt="{{ page.gamename }}"></a>
			{% endfor %}
		{% endfor %}
		<br><br>
	</div>
	
{% endblock %}